package routers

import (
	"go-gin-init/app/api/postAPI"
	"go-gin-init/app/middleware"
)

func (r *RouterGroup) PostRouter() {

	postRouter := r.Group("post")
	postRouter.POST("list", postAPI.PostPageList)

	// 需要jwt验证
	postRouter.Use(middleware.JWTAuth())
	postRouter.POST("add", postAPI.PostCreate)
	postRouter.DELETE("del/:id", postAPI.PostDelete)
	postRouter.POST("update", postAPI.PostUpdate)
}
